﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QLKhachSan.DTO;
using System.Data;
using System.Data.SqlClient;


namespace QLKhachSan.DAO
{
    public class DAO_KieuPhong
    {
        public static void themKieuPhong(DTO_KieuPhong p)
        {
            string[] name = new string[1] { "@TenKP" };
            object[] ob = new object[1] { p.TenKP };
            clsKetNoi.ThucThiLenhCoTS("pr_ThemKieuPhong", name, ob, 1);
        }
        public static DataTable hienthiDanhSachKieuPhong()
        {
            return clsKetNoi.Load("pr_HienThiKieuPhong");
        }
        public static void suaKieuPhong(DTO_KieuPhong p)
        {
            string[] name = new string[2] { "@MaKP", "@TenKP" };
            object[] ob = new object[2] { p.MaKP, p.TenKP };
            clsKetNoi.ThucThiLenhCoTS("pr_SuaKieuPhong", name, ob, 2);
        }
        public static void xoaKieuPhong(DTO_KieuPhong p)
        {
            string[] name = new string[1] { "@MaKP" };
            object[] ob = new object[1] { p.MaKP };
            clsKetNoi.ThucThiLenhCoTS("pr_XoaKieuPhong", name, ob, 1);
        }
    }
}
